<?php
$printer = ("\\\\190.30.0.3\\HPD"); 
if($ph = printer_open($printer))
{ 


printer_set_option($ph, PRINTER_MODE, "TEXT");
   printer_write($ph, "teste");
   printer_close($ph);
} 
else "não foi possivel conectar...";
?>